package com.smartcommunity.service.access;

import com.smartcommunity.dao.access.AccessDeviceDao;
import com.smartcommunity.entity.ac.AccessDevice;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class AccessDeviceService {

    @Autowired
    private AccessDeviceDao accessDeviceDao;

    /**
     * 根据ID获取门禁设备列表
     *
     * @param id
     * @return
     */
    public AccessDevice getAccessDevice(String id) {
        return accessDeviceDao.getAccessDevice(id);
    }

    public List<AccessDevice> getAccessDevice(List<String> ids) {
        return accessDeviceDao.getAccessDeviceByIds(ids);
    }

    public Integer getAccessDeviceCount() {
        return accessDeviceDao.getAllAccessDeviceCount();
    }
}
